Repository navigation
ref(android): Remove consumer keep rules that have no effect - #6778
Merged
Merged
Conversation
Nothing looks up these classes or members by name: the interceptor and listener keepnames predate hardcoded integration names, the SentryOkHttpInterceptor module is gone, sentry-native's JNI uses its own io.sentry.ndk.DebugImage, and neither LayoutNode.layoutDelegate nor FillElement is referenced anymore. Refs #6771 Refs JAVA-856 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
PR risk: mediumFor commit Main concerns: public contract, reach. Rules that block low also fired:
This label is a hint for reviewers, not an approval. |
4 of 9 tasks
📲 Install BuildsAndroid
|
runningcode
commented
Nov 25, 2026
runningcode
marked this pull request as ready for review
November 25, 2026 15:28
runningcode
requested review from
0xadam-brown and
markushi
and removed request for
a team
November 25, 2026 15:28
3 of 9 tasks
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
runningcode
enabled auto-merge (squash)
November 26, 2026 15:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Description
Removes Android consumer keep rules that have no effect: nothing looks up these classes or members by name.
💡 Motivation and Context
Google Play adds DEX optimization thresholds in Feb 2027, and library consumer rules count against the app. Part of #6771 (JAVA-856).
Deliberately kept: the
native <methods>rule insentry-android-ndk. It also matches hybrid SDK and app classes underio.sentry.**, and sentry-dart's ProGuard file says it relies on it. Apps that use AGP's default ProGuard files already keep all native methods anyway.💚 How did you test it?
Built the minified
sentry-samples-androidrelease with and without these changes (together with the narrowing PR) and ran the same journey on an API 36 emulator: exceptions with screenshot and view hierarchy, Timber, native capture, fragment and Compose click breadcrumbs, Session Replay, and a Java crash on relaunch. Captured the envelopes locally. The events, attachments, view hierarchy tags, breadcrumbs, andsdk.integrationswere identical, and logcat showed no reflection failures.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
The enum and
SentryOptionsrules are 90% of the remaining impact, and they wait on the hybrid SDKs to ship their own keeps.🤖 Generated with Claude Code